<template>
  <el-main>
    <el-row class="body-card">
      <h3 style="cursor: pointer">分享内容</h3>
      <Divider/>
       <el-row>
                <foot-card-item :text="item.footprintbrief" :username="item.shareusername" :date="item.date" :title="item.footprinttitle" :showEvent="()=>routerToShow(item.id)" v-for="(item,index) in footprintshare_items" :key="index"></foot-card-item>
        </el-row>
    </el-row>
  </el-main>
</template>
<script>
  import {footprintshareServer} from '../../api/friend';
  export default {
    name: "sharecontent",
    data() {
      return {
        dialogFormVisible: false,
        dialogTypes: 0,
        seachuser_id:[],
        formLabelWidth: '100px',
		 footprintshare_items: [], 
      
      };
    },
    mounted() { 
    this.getfootprintshare();
  },
    methods: {
	 routerToShow(fid) {
      const { id } = this.node ? this.node : {};
      const params = { path: `/travel-footprints/show/${fid}` };
      if (!!id) {
        params.query = {};
        params.query.srcId = id;
      }
      this.routerTo(params);
    }, 
      getfootprintshare(){
	       console.log("sdf");
        footprintshareServer("get").then(
            suc => {
              const { code,data, message } = suc.data;
              if (code) { 
          const { code, data, message } = suc.data;
		     this.footprintshare_items = data;
              } else {
                this.$message({
                  type: "error",
                  message
                });
              }
            },
            err => {
              this.$message({
                type: "error",
                message: err.message
              });
            }
          ); 
       }, 
    }
  };
</script>

<style lang="less">

</style>
